﻿using BCDto.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace BCDto.Common.Banner
{
    /// <summary>
    /// Banner请求模型
    /// </summary>
    public class BannerRequestDto
    {
        /// <summary>
        /// Banner名称
        /// </summary>
        [Display(Name = "Banner名称")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(50, MinimumLength = 1, ErrorMessage = "{0} 应为 {2} 到 {1} 个字符。")]
        public string Name { get; set; }
        /// <summary>
        /// Banner背景图片
        /// </summary>
        [Display(Name = "Banner背景图片")]
        [Required(ErrorMessage="{0} 不能为空")]
        [Image(ErrorMessage="{0} 仅支持 .jpg, .jpeg, .png 三种格式")]
        public string BackgroundImage { get; set; }
        /// <summary>
        /// Banner前景图片
        /// </summary>
        [Display(Name = "Banner前景图片")]
        [Image(ErrorMessage = "{0} 仅支持 .jpg, .jpeg, .png 三种格式")]
        public string ForegroundImage { get; set; }
        /// <summary>
        /// Banner标题
        /// </summary>
        [Display(Name = "Banner标题")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(20, MinimumLength = 1, ErrorMessage = "{0} 应为 {2} 到 {1} 个字符。")]
        public string Title { get; set; }
        /// <summary>
        /// Banner说明
        /// </summary>
        [Display(Name = "Banner说明")]
        public string Description { get; set; }
        /// <summary>
        /// 跳转Url
        /// </summary>
        [Display(Name = "跳转Url")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string Url { get; set; }
        /// <summary>
        /// Banner标记码
        /// </summary>
        [Display(Name = "Banner标记码")]
        public string BannerTagcode { get; set; }
    }
}
